export default function (name, legends, data, series, formatter, dataZoomIsShow = false, start = 0, animation=true) {
  return {
    animation,
    // animationDuration: 1500,
    // title: {
    //   text: '温\n度',
    //   top: 'center',
    //   left: '10'
    // },
    tooltip: {
      trigger: 'axis'
    },
    grid: {
      top: 30,
      bottom: 20,
      left: '7%',
      right: '7%',
    },
    legend: {
      // orient: 'vertical',
      // top: 'center',
      data: legends
    },
    dataZoom: {
      type: 'slider',
      show: dataZoomIsShow,
      xAxisIndex: [0],
      start,
      end: 100
    },
    xAxis: {
      type: 'category',
      boundaryGap: false,
      data,
      axisLine: {
        onZero: false,
        // xAxis.axisLine.show
        // show: false,
        lineStyle: {
          color: '#f0f0f0'
        }
      },
      axisLabel: {
        color: '#000'
      }
    },
    yAxis: {
      name,
      nameTextStyle: {
        color: '#000'
      },
      type: 'value',
      axisLabel: {
        color: '#000',
        formatter
      },
      splitLine: {
        show: false,
        lineStyle: {
          type: 'dashed'
        }
      },
      axisLine: {
        // show: false,
        onZero: false,
        lineStyle: {
          color: '#f0f0f0'
        }
      },
    },
    series
  }
}